var product = Vue.component('product',{
	template : "#product-template",
	data: function(){
		return{
			popShow: false,
			showProduct: true
		}
	},
	created: function(){
		this.toTop();
		console.log('a');
	},
	methods: {
		showPop: function(){
			// console.log('a');
			this.popShow = true;
		},
		closePop: function(){
			// console.log('b');
			this.popShow = false;
		},
		toCart: function(){
			// console.log('a');
			// console.log(this.$toast);
			this.$toast({
				message: '添加购物车成功',
				className: 'cartSuccess'
			});
		},
		goBack: function(){
			// console.log(true);
			router.back();
		},
		toTop: function(){
			window.scrollTo(0,0);
			console.log('b');
		},
		toHome: function(){
			router.push('home');
		},
		toCart: function(){
			router.push('shopcart');
		}
	}
});